Telegram Group & Telegram Channel
34. Number pattern 9.

1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1


class PrintPattern
{
public static void main(String args[])
{
int n = 5;
for (int i = 1; i <= n; i++)
{
int j = n - i;
while (j > 0)
{
System.out.print(" ");
j--;
}

j = 1;
while (j <= i)
{
System.out.print(" " + j);
j++;
}

j = i - 1;
while (j > 0)
{
System.out.print(" " + j);
j--;
}

j = n - i;
while (j > 0)
{
System.out.print(" ");
j--;
}
System.out.println();
}
}
}

@java_codings



tg-me.com/java_codings/46
Create:
Last Update:

34. Number pattern 9.

1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1


class PrintPattern
{
public static void main(String args[])
{
int n = 5;
for (int i = 1; i <= n; i++)
{
int j = n - i;
while (j > 0)
{
System.out.print(" ");
j--;
}

j = 1;
while (j <= i)
{
System.out.print(" " + j);
j++;
}

j = i - 1;
while (j > 0)
{
System.out.print(" " + j);
j--;
}

j = n - i;
while (j > 0)
{
System.out.print(" ");
j--;
}
System.out.println();
}
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/46

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

Dump Scam in Leaked Telegram Chat

A leaked Telegram discussion by 50 so-called crypto influencers has exposed the extraordinary steps they take in order to profit on the back off unsuspecting defi investors. According to a leaked screenshot of the chat, an elaborate plan to defraud defi investors using the worthless β€œ$Few” tokens had been hatched. $Few tokens would be airdropped to some of the influencers who in turn promoted these to unsuspecting followers on Twitter.

The SSE was the first modern stock exchange to open in China, with trading commencing in 1990. It has now grown to become the largest stock exchange in Asia and the third-largest in the world by market capitalization, which stood at RMB 50.6 trillion (US$7.8 trillion) as of September 2021. Stocks (both A-shares and B-shares), bonds, funds, and derivatives are traded on the exchange. The SEE has two trading boards, the Main Board and the Science and Technology Innovation Board, the latter more commonly known as the STAR Market. The Main Board mainly hosts large, well-established Chinese companies and lists both A-shares and B-shares.

Advance Java ‍ from sa


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA